package com.tiger.jms.sample5;

import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

public class Sample5Client {
	public static void main(String args[]) {
		try {
			InitialContext ctx = new InitialContext();
			// Object obj = ctx.lookup("java:comp/env/ejb/SenderBean");
			Object obj = ctx.lookup("comp/env/ejb/SenderBean");
			SenderHome senderHome = (SenderHome) PortableRemoteObject.narrow(obj, SenderHome.class);
			Sender sender = senderHome.create();
			sender.send("Hello");
			sender.remove();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
